﻿using System;
using System.Web.Mvc;

namespace www.Controllers
{
    public static class NavActive
    {
        public static String NavActives(this HtmlHelper htmlHelper,string actionName,string controllerName)
        {
            var controller = htmlHelper.ViewContext.RouteData.GetRequiredString("controller");
            var action = htmlHelper.ViewContext.RouteData.GetRequiredString("action");

            if (controllerName == controller && action == actionName)
                return "active";
            return String.Empty;
        }

       
    }
}